using System;
using System.Net;
using CommunityServer.Components;
using CommunityServer.Reader.Components;
using Rss;

namespace CommunityServer.RollerBlogs.Components
{
    public class RollerBlogFeed
    {
        public RollerBlogFeed()
        {

        }

        public HttpWebRequest CreateRequest()
        {
            HttpWebRequest request = CSRequest.CreateRequest(Url);
            return request;
        }

        private int sectionId;
        public int SectionId
        {
            get { return sectionId; }
            set { sectionId = value; }
        }

        private bool isBlogAggregated;
        public bool IsBlogAggregated
        {
            get { return isBlogAggregated; }
            set { isBlogAggregated = value; }
        }

        private bool isBlogRollAggregated;
        public bool IsBlogRollAggregated
        {
            get { return isBlogRollAggregated; }
            set { isBlogRollAggregated = value; }
        }

        private int urlId;
        public int UrlId
        {
            get { return urlId; }
            set { urlId = value; }
        }

        private string url;
        /// <summary>
        /// The rss feed to monitor
        /// </summary>
        public string Url
        {
            get { return url; }
            set { url = value; }
        }

        private string siteUrl;
        /// <summary>
        /// A link to the site where the feed is coming from 
        /// </summary>
        public string SiteUrl
        {
            get { return siteUrl; }
            set { siteUrl = value; }
        }
        
        private int settingsID;
        public int SettingsID
        {
            get { return settingsID; }
            set { settingsID = value; }
        }

        private int intervalMinutes;
        public int IntervalMinutes
        {
            get { return intervalMinutes; }
            set { intervalMinutes = value; }
        }

        private bool enabled;
        public bool Enabled
        {
            get { return enabled; }
            set { enabled = value; }
        }

        private string title;
        public string Title
        {
            get { return title; }
            set { title = value; }
        }

        private bool postFullText;
        public bool PostFullText
        {
            get { return postFullText; }
            set { postFullText = value; }
        }

        private int exerptSize;
        public int ExerptSize
        {
            get { return exerptSize; }
            set { exerptSize = value; }
        }

        private FeedState state;
        public FeedState State
        {
            get { return state; }
            set { state = value; }
        }

        private DateTime subscribeDate;
        public DateTime SubscribeDate
        {
            get { return subscribeDate; }
            set { subscribeDate = value; }
        }

        private DateTime lastUpdateDate;
        public DateTime LastUpdateDate
        {
            get { return lastUpdateDate; }
            set { lastUpdateDate = value; }
        }

        private DateTime lastModifiedDate;
        public DateTime LastModifiedDate
        {
            get { return lastModifiedDate; }
            set { lastModifiedDate = value; }
        }

        private string etag;
        public string Etag
        {
            get { return etag; }
            set { etag = value; }
        }
    }
}
